#pragma once

/************************************************************************/
/* 包含一些公用的宏定义                                              
宏定义格式为: 大写字母组成单词 + _ + 大写字母单词
*/
/************************************************************************/

#define LOGGER_NAME		"filelog"	//global logger name
#define LOG_FILE_NAME	"a.log"		//文件log文件 name

#define INVALID_SESSION_ID		0


#include "share_def.h"

#include <string>
#include <string_view>

class SessionMessage
{
public:
	SessionMessage(SessionType sid, std::string m):sessionid(sid)
	{
		msg = m;
	}
public:
	SessionType sessionid;
	std::string msg;
};

class SessionRequestMessageBody
{
public:
	SessionRequestMessageBody(SessionType sid, std::string m):sessionid(sid)
	{
		msg = m;
	}
	SessionType sessionid;
	std::string msg;
};

enum class ResponseType
{
	unicast,
	multicast,
	broadcast,
};

using SessionRequestMessage = SessionMessage;
using MultibroadSessionType = uint64_t;

class SessionResponseMessage : public SessionMessage
{
public:
	SessionResponseMessage(ResponseType type, SessionType sid, std::string msg) :SessionMessage(sid, msg)
	{
		respType = type;
	}
public:
	ResponseType respType;
};
